package com.ztgf.order.models.dto;

import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.ztgf.common.annotations.CustomerBigDecimalSerialize;
import com.ztgf.common.dto.BaseDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 订单支付关联关系表DTO
 *
 * @author YUE
 * @Date 2020-06-23 10:34:22
 */
@Data
@TableName("order_pay_relation")
@ApiModel(value="订单支付关联关系表对象", description="订单支付关联关系表对象")
public class OrderPayRelationDTO extends BaseDTO implements Serializable {

    @ApiModelProperty(value = "乐观锁")
    private Integer revision;
    @ApiModelProperty(value = "创建人")
    private Long createUserId;
    @ApiModelProperty(value = "更新人")
    private Long updateUserId;
    @ApiModelProperty(value = "订单id")
    private Long orderId;
    @ApiModelProperty(value = "支付状态 0未付款、1支付中、2支付成功、3支付失败")
    private Integer payState;
    @ApiModelProperty(value = "订单实付金额")
    @JsonSerialize(using = CustomerBigDecimalSerialize.class)
    private BigDecimal realPayMoney;
    @ApiModelProperty(value = "佣金")
    @JsonSerialize(using = CustomerBigDecimalSerialize.class)
    private BigDecimal commissionMoney;
    @ApiModelProperty(value = "期数")
    private Integer periods;
    @ApiModelProperty(value = "支付订单id")
    private Long payOrderId;
    @ApiModelProperty(value = "0余额、1网银、2票据")
    private Integer payType;
    @ApiModelProperty(value = "中金流水号")
    private String zjBusinessId;
    @ApiModelProperty(value = "已退佣金（期货的包含在第一条记录中，目前无用）")
    @JsonSerialize(using = CustomerBigDecimalSerialize.class)
    private BigDecimal returnCommissionMoney;
    @ApiModelProperty(value = "支付成功时间")
    private Date paySuccessTime;
    @ApiModelProperty(value = "先款支付金额状态：0冻结、1解冻")
    private Integer realPayMoneyStatus;

    @ApiModelProperty(value = "解冻金额(签收后用)")
    @JsonSerialize(using = CustomerBigDecimalSerialize.class)
    private BigDecimal unfreezeMoney;
    @ApiModelProperty(value = "解冻金额状态 0未付款、1解冻中、2解冻成功、3解冻失败(签收后用)")
    private Integer unfreezeMoneyStatus;

    @ApiModelProperty(value = "退款状态 0未付款、1支付中、2支付成功、3支付失败")
    private Integer payBackStatus;
    @ApiModelProperty(value = "退款金额")
    @JsonSerialize(using = CustomerBigDecimalSerialize.class)
    private BigDecimal refundMoney;
    @ApiModelProperty(value = "退款金额状态 0未付款、1解冻中、2解冻成功、3解冻失败")
    private Integer refundMoneyStatus;

    @ApiModelProperty(value = "用户票据上传确认时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date billConfirmTime;

    @ApiModelProperty(value = "票据名称")
    private String billName;
    @ApiModelProperty(value = "票据图片")
    private String billUrl;
    @ApiModelProperty(value = "票据不同意原因")
    private String billReason;
}